package DARCOShared.requests;

public class ChangeOwnershipRequest implements RequestBase, java.io.Serializable {
	private static final long serialVersionUID = 1L;
	
	public String cardSN;
	public String cardUID;
	public String newOwnerUsername;
	public byte[] currentOwnerTradeSignature;
	public boolean locationPresent;
	public float latitude;
	public float longitude;
	
	public ChangeOwnershipRequest(){}
	public ChangeOwnershipRequest(String cardSN, String cardUID, String newOwnerUsername, byte[] currentOwnerTradeSignature){
		locationPresent = false;
		this.cardSN = cardSN;
		this.cardUID = cardUID;
		this.newOwnerUsername = newOwnerUsername;
		this.currentOwnerTradeSignature = currentOwnerTradeSignature;
	}
	
	public ChangeOwnershipRequest(String cardSN, String cardUID, String newOwnerUsername, byte[] currentOwnerTradeSignature, float latitude, float longitude){
		locationPresent = true;
		this.cardSN = cardSN;
		this.cardUID = cardUID;
		this.newOwnerUsername = newOwnerUsername;
		this.currentOwnerTradeSignature = currentOwnerTradeSignature;
		this.latitude = latitude;
		this.longitude = longitude;
	}
	
	@Override
	public RequestType getRequestType() {
		return RequestType.ChangeOwnership;
	}

}
